/*
 * @Author: Troubadour 2276791354@qq.com
 * @Date: 2024-07-28 20:30:13
 * @LastEditors: Troubadour 2276791354@qq.com
 * @LastEditTime: 2024-07-28 20:31:41
 * @Version:
 * @Description:
 */

#ifndef __TEMPLATE_H__
#define __TEMPLATE_H__

/*-------------------------------------------------------------------------------------------------------------------------------------
-                                                  Include file                                                                       -
--------------------------------------------------------------------------------------------------------------------------------------*/
#include "main.h"

/*-------------------------------------------------------------------------------------------------------------------------------------
-                                                  External macro                                                                     -
--------------------------------------------------------------------------------------------------------------------------------------*/

#define INA226_NUMBER               (3)
/*-------------------------------------------------------------------------------------------------------------------------------------
-                                                  External enum                                                                      -
--------------------------------------------------------------------------------------------------------------------------------------*/


/*-------------------------------------------------------------------------------------------------------------------------------------
-                                                  External structure                                                                 -
--------------------------------------------------------------------------------------------------------------------------------------*/


/*-------------------------------------------------------------------------------------------------------------------------------------
-                                                  External variables                                                                 -
--------------------------------------------------------------------------------------------------------------------------------------*/


/*-------------------------------------------------------------------------------------------------------------------------------------
-                                                  External function                                                                  -
--------------------------------------------------------------------------------------------------------------------------------------*/

uint8_t INA226_App_Measure_AllData(uint8_t channel);
uint8_t INA226_App_Get_Current(uint8_t channel, double *current);
uint8_t INA226_App_Get_VbusVoltage(uint8_t channel, double *voltage);
uint8_t INA226_App_Get_ShuntVoltage(uint8_t channel, double *voltage);
uint8_t INA226_App_Get_PowerIns(uint8_t channel, double *power);
uint8_t INA226_App_Get_ID(uint8_t channel, uint16_t *devid);
void INA226_App_Init(void);


#endif  /* __TEMPLATE_H__ */
